import * as BL from 'babylon-lib/index';
import { DefaultStage } from "./stage/default-stage";
import { createApp } from 'vue';
import AppUI  from './ui/app-ui.vue';


export default class AppContainer extends BL.BabylonContainer {

    protected options(): BL.IContainerOptions {
        return {
            adaptToDeviceRatio: true,
            engineOptions:{
                limitDeviceRatio:1.5,
                preserveDrawingBuffer:true,
            },
            useRightHand:true,
            showPerformance:true,
        };
    }
    protected loadingUI(): HTMLElement | null {
        return document.getElementById('loading-page');
    }

    protected initializeStages(engine: BL.Engine, canvas: HTMLCanvasElement, bufferLoader: BL.BufferLoad): Array<BL.Stage> {
        const stage = new DefaultStage(engine, canvas, bufferLoader);
        stage.autoHideLoadingUI=false;
        return [stage];
    }

    protected renderUI(): void {
        // createApp(AppUI).mount(this.ui);
    }
    

}